﻿Public Class CompareTestClass

    '''''''''''''''''''''''''''''''''''''''
    ''''''''Coders:  '''''''''''''''''''''' 
    ''''''''''Joe Bittner''''''''''''''''''
    ''''''''''Rob        ''''''''''''''''''
    ''''''''Last update: 2/14 '''''''''''''

    ''Notes
    ''Change arrays into dynamic arrays
    ''Restructure code to be written without changing
    ''build code elements that don't have to be changed
    ''Imports DARSClassLibrary
    'Option Strict On
    'Option Explicit On

    Dim studentArray(3) As String
    Dim majorArray(4) As String
    Dim majorArrayBooleanValues(4) As String
    Dim coursesStillRequiredInMajor(1000)

    'Dim studentArrayList As New ArrayList
    'Dim courseArrayList As New ArrayList
    'Dim studentCourseCollection As New StudentCourseProperties
    'Dim majorCourseCollection As New MajorCourseProperties


    'Public Sub compare(ByVal studentID As String, ByVal majorID As String)
    Public Function compare(ByVal item As String)
        ''hard coded data for testing/simulation purposes
        ''Instead of this hard coded data, code will be written to get the data from the web service and then placed into arrays.



        studentArray(0) = "CIS2323 Database Design"
        studentArray(1) = item
        studentArray(2) = "CIS4323 Programming in VB"

        majorArray(0) = "CIS2323 Database Design"
        majorArray(1) = "CIS9323 Database Destruction"
        majorArray(2) = "CIS1323 Testing"
        majorArray(3) = "CIS4323 Programming in VB"



        'studentCourseCollection.Course = "CIS4534"
        'studentArrayList.Add(studentCourseCollection)
        'majorCourseCollection.Course = "CIS4534"
        'studentArrayList.Add(majorCourseCollection)


        'Loop compares two arrays and inserts "True" or "False" into another array 
        Dim i As Integer = 0
        While i <> studentArray.Length

            Dim j As Integer = 0

            While j <> majorArray.Length
                If studentArray(i) = majorArray(j) Then
                    majorArrayBooleanValues(j) = "True"
                ElseIf majorArrayBooleanValues(j) <> "True" Then
                    majorArrayBooleanValues(j) = "False"
                End If
                j = j + 1
            End While


            i = i + 1
        End While

        'loop that places untaken courses into another array
        Dim k As Integer = 0
        Dim L As Integer = 0
        While k <> majorArray.Length
            If majorArrayBooleanValues(k) = "False" Then

                coursesStillRequiredInMajor(L) = majorArray(k)
                L = L + 1
            End If
            k = k + 1
        End While
        Return studentArray(1)

    End Function

    Function compare() As Object
        Throw New NotImplementedException
    End Function


End Class
